home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / perl5 / HTML / Tree.pm < prev    next >
Encoding:
Perl POD Document  |  2005-11-09  |  3.5 KB  |  122 lines

  1.  
  2. package HTML::Tree;
  3. $VERSION = $VERSION = 3.19_01;
  4.   # This is where the dist gets its version from.
  5.  
  6. # Basically just a happy alias to HTML::TreeBuilder
  7. use HTML::TreeBuilder ();
  8.  
  9. sub new {
  10.   shift; unshift @_, 'HTML::TreeBuilder';
  11.   goto &HTML::TreeBuilder::new;
  12. }
  13. sub new_from_file {
  14.   shift; unshift @_, 'HTML::TreeBuilder';
  15.   goto &HTML::TreeBuilder::new_from_file;
  16. }
  17. sub new_from_content {
  18.   shift; unshift @_, 'HTML::TreeBuilder';
  19.   goto &HTML::TreeBuilder::new_from_content;
  20. }
  21.  
  22. 1;  
  23.  
  24. __END__
  25.  
  26. =head1 NAME
  27.  
  28. HTML::Tree - overview of HTML::TreeBuilder et al
  29.  
  30. =head1 SYNOPSIS
  31.  
  32.   use HTML::TreeBuilder;
  33.   my $tree = HTML::TreeBuilder->new();
  34.   $tree->parse_file($filename);
  35.    #
  36.    # Then do something with the tree, using HTML::Element
  37.    # methods -- for example $tree->dump
  38.    #
  39.    # Then:
  40.   $tree->delete;
  41.  
  42. =head1 DESCRIPTION
  43.  
  44. HTML-Tree is a suite of Perl modules for making parse trees out of
  45. HTML source.  It consists of mainly two modules, whose documentation
  46. you should refer to: L<HTML::TreeBuilder|HTML::TreeBuilder>
  47. and L<HTML::Element|HTML::Element>.
  48.  
  49. HTML::TreeBuilder is the module that builds the parse trees.  (It uses
  50. HTML::Parser to do the work of breaking the HTML up into tokens.)
  51.  
  52. The tree that TreeBuilder builds for you is made up of objects of the
  53. class HTML::Element.
  54.  
  55. If you find that you do not properly understand the documentation
  56. for HTML::TreeBuilder and HTML::Element, it may be because you are
  57. unfamiliar with tree-shaped data structures, or with object-oriented
  58. modules in general.  I have written some articles for I<The Perl
  59. Journal> (C<www.tpj.com>) that seek to provide that background:
  60. my article "A User's View of Object-Oriented Modules" in TPJ17;
  61. my article "Trees" in TPJ18;
  62. and
  63. my article "Scanning HTML" in TPJ19.
  64. The full text of those articles is contained in this distribution, as:
  65.  
  66. L<HTML::Tree::AboutObjects|HTML::Tree::AboutObjects>
  67. -- article: "User's View of Object-Oriented Modules"
  68.  
  69. L<HTML::Tree::AboutTrees|HTML::Tree::AboutTrees>
  70. -- article: "Trees"
  71.  
  72. L<HTML::Tree::Scanning|HTML::Tree::Scanning>
  73. -- article: "Scanning HTML"
  74.  
  75. Readers already familiar with object-oriented modules and tree-shaped
  76. data structures should read just the last article.  Readers without
  77. that background should read the first, then the second, and then the
  78. third.
  79.  
  80. =head1 SEE ALSO
  81.  
  82. L<HTML::TreeBuilder>, L<HTML::Element>, L<HTML::Tagset>,
  83. L<HTML::Parser>
  84.  
  85. L<HTML::DOMbo>
  86.  
  87. The book I<Perl & LWP> by me, Sean M. Burke, published by
  88. O'Reilly and Associates, 2002.  ISBN: 0-596-00178-9
  89.  
  90. It has several chapters to do with HTML processing in general,
  91. and HTML-Tree specifically.  There's more info at:
  92.  
  93.   http://www.oreilly.com/catalog/perllwp/
  94.   http://www.amazon.com/exec/obidos/ASIN/0596001789
  95.  
  96. =head1 COPYRIGHT
  97.  
  98. Copyright 1995-1998 Gisle Aas; copyright 1999-2002 Sean M. Burke.
  99. (Except the articles contained in HTML::Tree::AboutObjects,
  100. HTML::Tree::AboutTrees, and HTML::Tree::Scanning, which are all
  101. copyright 2000 The Perl Journal.)
  102.  
  103. Except for those three TPJ articles, the whole HTML-Tree distribution,
  104. of which this file is a part, is free software; you can redistribute
  105. it and/or modify it under the same terms as Perl itself.
  106.  
  107. Those three TPJ articles may be distributed under the same terms as
  108. Perl itself.
  109.  
  110. The programs and documentation in this dist are distributed in
  111. the hope that they will be useful, but without any warranty; without
  112. even the implied warranty of merchantability or fitness for a
  113. particular purpose.
  114.  
  115. =head1 AUTHOR
  116.  
  117. Original HTML-Tree author Gisle Aas E<lt>gisle@aas.noE<gt>; current
  118. maintainer Sean M. Burke, E<lt>sburke@cpan.orgE<gt>
  119.  
  120. =cut
  121.  
  122.